import os
import yaml

def write_yaml(filename,data):
    with open(os.getcwd() + "/data/" + filename, mode="a+", encoding="utf-8") as f:
        yaml.safe_dump(data, stream=f)

def read_yaml(filename,key):
    with open(os.getcwd()+"/data/"+filename,encoding="utf-8",mode="r") as f:
        data=yaml.safe_load(f)
        return data[key]